-
Notifications
You must be signed in to change notification settings - Fork 241
[FEA] Centralize CUDA environment variable handling and prioritize CUDA_PATH over CUDA_HOME #1519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
/ok to test |
|
Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
/ok to test |
|
/ok to test |
|
/ok to test |
|
/ok to test |
|
|
/ok to test |
| "setuptools_scm[simple]>=8", | ||
| "cython>=3.2,<3.3", | ||
| "pyclibrary>=0.1.7", | ||
| "cuda-pathfinder", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's already on line 34 below. Having it there seemed to work reliably in all situations?
This PR introduces centralized CUDA environment variable handling across cuda-python packages with improved consistency and better handling of conflicting environment variable configurations.
The previous implicit priority of CUDA_HOME over CUDA_PATH was inconsistent with:
Key Changes
Breaking Change - Environment Variable Priority
Changed the search order priority from
CUDA_HOME > CUDA_PATHtoCUDA_PATH > CUDA_HOMEto align with NVIDIA tooling standards and industry conventions. This affects all packages that query CUDA Toolkit locations (cuda.pathfinder, cuda.core, cuda.bindings).New Module:
cuda.pathfinder._utils.env_var_constantsCUDA_ENV_VARS_ORDERED = ("CUDA_PATH", "CUDA_HOME")Enhanced
cuda.pathfinder._utils.env_varsget_cuda_home_or_path()with robust path comparison usingos.path.samefile()Closes #1433.